package org.iteam.bank.signed.service;

import org.iteam.bank.signed.model.P2POrder;
import org.iteam.db.SimpleDbRunner;
import org.iteam.db.exception.DbException;

public class P2POrderService {

	private P2POrderService() {
		super();
	}

	public static P2POrderService getInstance() {
		return Subclass.service;
	}

	private static final class Subclass {
		public static final P2POrderService service = new P2POrderService();

	}

	public P2POrder show(String dealno) throws DbException {
		return new SimpleDbRunner().findBeanOne(P2POrder.class, "select * from p2p_order where dealno = ? ", dealno);
	}

	public P2POrder show(SimpleDbRunner dbRunner, String dealno) throws DbException {
		return dbRunner.findBeanOne(P2POrder.class, "select * from p2p_order where dealno = ? ", dealno);
	}

}
